- How Uniswap Works: Centralized vs Decentralized Exchanges
- How to Use and Trade on Uniswap
- How to Provide Liquidity on Uniswap
- Uniswap Governance: $UNI Token
- Final Thoughts: Uniswap Exchange Review
Uniswap is an Ethereum-based decentralized cryptocurrency exchange (DEX) or a smart contract protocol that allows anyone to swap ERC20 tokens.
Uniswap is the largest cryptocurrency exchange of its type, with more than $4.3 billion in total liquidity locked, approximately $1 billion in daily volume, and just over $100 billion in total trading volume processed since the platform’s launch in October 2018.
Uniswap is the brainchild of Hayden Adams, a former engineer at Siemens, who was inspired to create the token swap protocol by a 2016 Reddit post by Ethereum founder Vitalik Buterin.
The project was kickstarted with a $100,000 grant from the Ethereum Foundation and subsequently backed by several renowned venture capital funds, including Andreessen Horowitz (a16z) and Union Square Ventures.
How Uniswap Works: Centralized vs Decentralized Exchanges
When users want to buy or sell a cryptocurrency, they need to access a cryptocurrency exchange. Here, they’re faced with a choice; they can either go to a:
- centralized exchange, which doesn’t support self-custody and requires personally-identifying information to pass KYC checks,
- a non-custodial decentralized exchange like Uniswap, which requires no KYC checks and is accessible to anyone.
The typical centralized cryptocurrency exchange relies on order books and order matching systems to match the buyers with sellers and determine cryptocurrency prices. The order book is a real-time electronic record of all cryptocurrency orders and prices on the exchange, while the order matching system is a specialized software protocol that matches and settles orders from the order book.
In order to guarantee liquidity, centralized cryptocurrency exchanges employ so-called professional market makers — primarily represented by big bangs, brokerage houses, and other large and sophisticated financial institutions — who continuously provide a “bid-ask spread” on the exchange.
Way say that these market makers “make the market” because they’re continually there to buy and sell cryptocurrencies (provide liquidity) so that the exchange users will always have someone to trade against. Market makers make their money on “the spread” or the small difference between the quoted and the real market value of the cryptocurrencies they’re trading.
On the other hand, decentralized exchanges like Uniswap don’t rely on order books and order matching systems to settle orders and determine prices. Instead, they use so-called Automated Market Makers (AMMs), which represent smart contacts that create and manage liquidity pools of tokens, and set these tokens’ prices based on algorithms or mathematical formulas.
It is very important to understand that when users trade on Uniswap, they aren’t interacting with other traders (peer-to-peer) but rather directly with the AMM smart contract (peer-to-contract).
Under the hood, when someone initiates a swap on Uniswap, say they wish to exchange $100 in ETH for $100 in WBTC, the AMM smart contract will automatically send the ETH to the ETH-WBTC liquidity pool and exchange it for the equivalent value of WBTC.
However, the exchange rate isn’t determined by the supply and demand like on centralized cryptocurrency exchanges but calculated using the following mathematical formula: X*Y=K — where X and Y represent the value of each token in the pool, and K is a predefined constant.
For example, let’s assume there’s a hypothetical pool containing Ethereum (ETH) and Random Coin X (RCX), where the pool starts with 10 ETH (X) and 500 RCX (Y) of initial liquidity. In this case, the constant or K would equal 10 x 500 = 5000.
Now, let’s assume you want to buy 1 ETH worth of RCX tokens. How many tokens would you get?
Uniswap’s AMM smart contract would calculate the price of RCX tokens in the following way: when you swap 1 ETH for X amount of RCX tokens, you’re left with 11 ETH and an unknown amount of RCX tokens in the pool, and a constant K = 5000. To calculate how many RTX tokens will be left in the pool after the swap, we need to divide the K with X to get the Y. That is: 5000/11 = 454.54.
This means that now, after the swap, there are 11 ETH (X) and 454.54 RTX tokens (Y) in the pool, whereas the constant K remained equal to 5000. If we subtract the number of RCX tokens after the swap from the amount of RCX before the swap, we get the price of RCX in ETH. That is 500-454.54=45.46. To conclude, for 1 ETH token, you would get 45.46 RTX tokens.
Aside from being open-source, super-easy to use, and accessible to virtually anyone with a cryptocurrency wallet, Uniswap allows users to earn passive income on their crypto by providing liquidity to the exchange and becoming a market maker themselves.
How to Use and Trade on Uniswap
Trading or swapping between ERC20 tokens on Uniswap is as simple as it gets. All you need is a cryptocurrency wallet like Metamask or a Ledger and some ERC20 tokens in it.
The first step in the process is to connect your wallet with Uniswap by clicking on the “Connect wallet” button on the interface’s top right corner.
When you do this, Uniswap will send a connection request to your wallet, which you’ll need to approve manually. This is so that Uniswap can seamlessly interact with your wallet and read its balance. Think of this as “logging in” to the exchange.
Once you’ve connected your wallet, you’re set to trade.
For instance, if you want to swap or sell ETH for 100 USDC, you’ll need to take the following steps:
Step 1:
Select ETH from the sidebar in the “From” field. Then, in the “To” field, select the USDC token and set the amount to 100. When you’re ready to make the exchange, click on the “Swap” button.
Step 2:
A pop-up side window containing the transaction details will open when you do this, asking you to confirm the transaction.
Here you can manually adjust the Gas fee you’ll need to pay (in ETH) for the swap and see how long it will take for the transaction to settle before you confirm the transaction.
Step 3:
Confirm the swap in your wallet. This is the last action required on your part. The USDC will arrive directly in your wallet as soon as the miners verify the transaction on the Ethereum blockchain.
How to Provide Liquidity on Uniswap
If you want to become a market maker and provide liquidity on Uniswap, you can do so by taking the following steps:
Step 1:
Click on the Pool button in the top left corner of the interface. Here you need to select the token pair or the pool to stake your tokens and provide liquidity. It is important to know that you can only enter liquidity pools with an equal dollar value of the two tokens in the pair. For example, if you want to add $1000 worth of liquidity in the ETH-USDC pool, you’ll need $500 in ETH and $500 in USDC to do so.
Step 2:
When you select the pool and the amount of liquidity you want to supply, click on the Supply button and approve the contract interaction notification. After you’ve confirmed the action and your transaction has been processed, you’ll receive a confirmation for your contribution along with UNI-V2 LP tokens representing your liquidity share in the pool.
As a liquidity provider, you’ll now passively earn a portion of the fees accumulated with every token swap in the pool, proportional to your share of the liquidity in it. For example, if you’ve contributed 5% of the total liquidity in the ETH-USDC pool, you’ll get 5% of the total fees generated by the same pool.
Step 3:
When you decide to exit the pool and cash out, you can simply remove the liquidity by clicking on the Remove Liquidity button in the same user interface. When your transaction is confirmed, you’ll receive back the ETH and USDC tokens you initially deposited, plus any fees you’ve earned for providing liquidity.
Uniswap Governance: $UNI Token
In September 2020, Uniswap introduced its governance token called UNI by airdropping 400 UNI (worth ~$1000 at the time) to every wallet that had in any way interacted with the protocol before September 1, 2020.
The primary purpose of the UNI token is to decentralize Uniswap’s governance. UNI token holders can vote on protocol improvement proposals and determine the project’s trajectory as it evolves. They can also control the protocol’s fee structure, fund liquidity mining pools, grants, and other growth-driven initiatives, manage the project’s community treasury, and so on.
The UNI token is also available for trading on most of the top cryptocurrency exchanges, such as Bitfinex, Coinbase Pro, Huobi Global, and OKEx. As of February 2021, the UNI token price is ~$26, with a market capitalization of ~$8 billion.
Final Thoughts: Uniswap Exchange Review
Uniswap is the most prominent decentralized exchange in the industry for a reason. It was the first to introduce the AMM model for pooling liquidity and setting prices, it’s straightforward and intuitive to use, it has no virtually no barrier to entry, and its pools have the highest liquidity compared to all other decentralized exchanges on the market.
The most serious issue facing Uniswap today is the super-high transaction fees on the Ethereum network. The Uniswap protocol itself charges a 0.30% fee for every swap that occurs on the protocol, which is somewhat within the reasonable range compared to leading centralized exchanges. However, the real problem is the Ethereum Gas fees, which currently range between $25 and $100 per swap or a peer-to-contract transaction due to the network’s overload.
Unfortunately, this makes Uniswap virtually unusable for smaller or sub $1000 transactions, and even then, the fees are still incredibly costly. Hopefully, Ethereum 2.0 will roll out soon enough with a much-improved transaction throughput and make on-chain microtransactions possible again.
Never Miss Another Opportunity! Get hand selected news & info from our Crypto Experts so you can make educated, informed decisions that directly affect your crypto profits. Subscribe to CoinCentral free newsletter now.